using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._Raster._Reclass
{
    /// <summary>
    /// <para>Reclass by ASCII File</para>
    /// <para>Reclassifies (or changes) the values of the input cells of a raster using an ASCII remap file.</para>
    /// <para>使用 ASCII 重映射文件对栅格的输入像元值进行重分类（或更改）。</para>
    /// </summary>    
    [DisplayName("Reclass by ASCII File")]
    public class ReclassByASCIIFile : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ReclassByASCIIFile()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_raster">
        /// <para>Input raster</para>
        /// <para>The input raster to be reclassified.</para>
        /// <para>要重新分类的输入栅格。</para>
        /// </param>
        /// <param name="_in_remap_file">
        /// <para>Input ASCII remap file</para>
        /// <para><xdoc>
        ///   <para>ASCII remap file defining the single values or ranges to be reclassified and the values they will become.</para>
        ///   <para>Allowed extensions for the ASCII remap files are .rmp, .txt, and .asc.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>ASCII 重新映射文件，用于定义要重新分类的单个值或范围以及它们将成为的值。</para>
        ///   <para>ASCII 重新映射文件允许的扩展名为 .rmp、.txt 和 .asc。</para>
        /// </xdoc></para>
        /// </param>
        /// <param name="_out_raster">
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output reclassified raster.</para>
        ///   <para>The output will always be of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出对栅格进行了重新分类。</para>
        ///   <para>输出将始终为整数类型。</para>
        /// </xdoc></para>
        /// </param>
        public ReclassByASCIIFile(object _in_raster, object _in_remap_file, object _out_raster)
        {
            this._in_raster = _in_raster;
            this._in_remap_file = _in_remap_file;
            this._out_raster = _out_raster;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Reclass by ASCII File";

        public override string CallName => "3d.ReclassByASCIIFile";

        public override List<string> AcceptEnvironments => ["autoCommit", "cellSize", "cellSizeProjectionMethod", "compression", "configKeyword", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "scratchWorkspace", "snapRaster", "tileSize", "workspace"];

        public override object[] ParameterInfo => [_in_raster, _in_remap_file, _out_raster, _missing_values.GetGPValue()];

        /// <summary>
        /// <para>Input raster</para>
        /// <para>The input raster to be reclassified.</para>
        /// <para>要重新分类的输入栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_raster { get; set; }


        /// <summary>
        /// <para>Input ASCII remap file</para>
        /// <para><xdoc>
        ///   <para>ASCII remap file defining the single values or ranges to be reclassified and the values they will become.</para>
        ///   <para>Allowed extensions for the ASCII remap files are .rmp, .txt, and .asc.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>ASCII 重新映射文件，用于定义要重新分类的单个值或范围以及它们将成为的值。</para>
        ///   <para>ASCII 重新映射文件允许的扩展名为 .rmp、.txt 和 .asc。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input ASCII remap file")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_remap_file { get; set; }


        /// <summary>
        /// <para>Output raster</para>
        /// <para><xdoc>
        ///   <para>The output reclassified raster.</para>
        ///   <para>The output will always be of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出对栅格进行了重新分类。</para>
        ///   <para>输出将始终为整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_raster { get; set; }


        /// <summary>
        /// <para>Change missing values to NoData</para>
        /// <para><xdoc>
        ///   <para>Denotes whether missing values in the reclass file retain their value or get mapped to NoData.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Signifies that if any cell location on the input raster contains a value that is not present or reclassed in the remap file, the value should remain intact and be written for that location to the output raster. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Signifies that if any cell location on the input raster contains a value that is not present or reclassed in the remap file, the value will be reclassed to NoData for that location on the output raster.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>表示重分类文件中的缺失值是保留其值还是映射到 NoData。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 表示如果输入栅格上的任何像元位置包含的值在重映射文件中不存在或未重分类，则该值应保持不变，并将该位置的值写入输出栅格。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 表示如果输入栅格上的任何像元位置包含重映射文件中不存在或未重分类的值，则该值将重分类为输出栅格上该位置的 NoData。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Change missing values to NoData")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _missing_values_value _missing_values { get; set; } = _missing_values_value._false;

        public enum _missing_values_value
        {
            /// <summary>
            /// <para>DATA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DATA")]
            [GPEnumValue("false")]
            _false,

            /// <summary>
            /// <para>NODATA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NODATA")]
            [GPEnumValue("true")]
            _true,

        }

        public ReclassByASCIIFile SetEnv(int? autoCommit = null, object cellSize = null, object compression = null, object configKeyword = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object scratchWorkspace = null, object snapRaster = null, double[] tileSize = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, cellSize: cellSize, compression: compression, configKeyword: configKeyword, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, scratchWorkspace: scratchWorkspace, snapRaster: snapRaster, tileSize: tileSize, workspace: workspace);
            return this;
        }

    }

}